import store from './../../vuex/index.js'

export default {
  inserted(el, binding, vnode) {
    const permissionRes = binding.expression;
    const buttonRes = store.state.resList;
    console.log(buttonRes);
    const hasPermission = buttonRes.includes(permissionRes);
    if (!hasPermission) {
      el.parentNode && el.parentNode.removeChild(el)
    }
  }
}
